package com.geekaca.d05;

import java.util.ArrayList;
import java.util.List;

public class HelloListObj {
    public static void main(String[] args) {
        /**
         * 集合中放对象
         */
        List<Movie> movieList = new ArrayList<>();
        movieList.add(new Movie("唐人街探案", 8.5, "王宝强"));
        movieList.add(new Movie("你好,李焕英", 9.5, "贾玲"));
        movieList.add(new Movie("刺杀小说逆风而上", 8.6, "雷佳音,杨幂"));

        for (Movie mv : movieList) {
            System.out.println(mv);
        }
        ;

        System.out.println("==============lambda================");
        movieList.forEach(movie -> System.out.println(movie));


    }
}
